package api

import request "gitee.com/changeden/volcengine-livesaas-request-go"

type GetAdvertisementDataRequest struct {
	ActivityId *int64 `json:"ActivityId"`
	Soucre     *int32 `json:"Soucre"`
}
type GetAdvertisementDataResponse struct {
	AdvertisingClicks AdvertisementData   `json:"AdvertisingClicks" gorm:"column:AdvertisingClicks"`
	ActivityID        int64               `json:"ActivityId" gorm:"column:ActivityId"`
	AccountClicks     AdvertisementData   `json:"AccountClicks" gorm:"column:AccountClicks"`
	AdInfo            []AdvertisementInfo `json:"AdInfo" gorm:"column:AdInfo"`
}
type AdvertisementData struct {
	UV        int32 `json:"UV" gorm:"column:UV"`
	PV        int32 `json:"PV" gorm:"column:PV"`
	TotalTime int32 `json:"TotalTime" gorm:"column:TotalTime"`
}
type AdvertisementInfo struct {
	AdType    int32  `json:"AdType"`
	Content   string `json:"Content"`
	Link      string `json:"Link"`
	UV        int32  `json:"UV" gorm:"column:UV"`
	PV        int32  `json:"PV" gorm:"column:PV"`
	TotalTime int32  `json:"TotalTime" gorm:"column:TotalTime"`
}

func (instance *Instance) GetAdvertisementData(data *GetAdvertisementDataRequest) (*GetAdvertisementDataResponse, error) {
	d := request.Data{
		Action: "GetAdvertisementDataAPI",
	}
	bindQuery(&d, *data)
	var res GetAdvertisementDataResponse
	err := instance.get(&d, &res)
	return &res, err
}
